import { Popup, Space, Button } from 'antd-mobile'
import { useState } from 'react'
import Nabar from "../../conpoment/Nabar"
import Address from '../../conpoment/address'
import style from './index.module.css'
function Index() {
  const [visible2, setVisible2] = useState(false)
  return (
    <div>
      <div>
        <Nabar title='收货地址' sticky={false}></Nabar>
      </div>
      <div className={style.addButtonContainer}>
        <Button block color='primary' onClick={() => {
          setVisible2(true)
        }}>+添加收货地址</Button>
      </div>
      <Popup
        visible={visible2}
        onMaskClick={() => {
          setVisible2(false)
        }}
        onClose={() => {
          setVisible2(false)
        }}
        position='top'
        bodyStyle={{ height: '100%', padding: 0, background: '#ccc' }}
      >
        <Address />
      </Popup>
    </div>
  )
}

export default Index
